package com.ll.beautymall.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/10/21.
 */
public class Banner {

    /**
     * pic_url : http://gouwu.cdn.yuike.com/data/img/457465/home_banner/e021838a41d2a6dceaa758ae9bb80ca3.jpg
     * url : beautymall://allbuy_list?mid=457465&type=dress&channel_id=1464783723&category_ids=4796,4797,4798,4799,4805,4839,4840,4841,4843,22151,22152,22153,22155,22168,22169,22170&sort=default&title=%E7%A7%8B%E8%A3%85%E6%96%B0%E5%93%81
     */

    private String pic_url;
    private String url;

    public static Banner objectFromData(String str) {

        return new Gson().fromJson(str, Banner.class);
    }

    public static List<Banner> arrayBannerFromData(String str) {

        Type listType = new TypeToken<ArrayList<Banner>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getPic_url() {
        return pic_url;
    }

    public void setPic_url(String pic_url) {
        this.pic_url = pic_url;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
